import request from '@/utils/request'
// 礼品店外调拨，获取门店礼品列表
export function getGiftList(data, page) {
    return request({
        url: '/House_transfer/gift_list_new/'+ (page ? page : 1),
        method: 'post',
        data: data
    })
}
// 礼品店外调拨下单，添加购物车
// gift_id: 礼品id
// type:   1 店外调拨 2店内调拨
// num:    数量
// store_id:   门店d
export function addToCart(data) {
  return request({
      url: "/House_transfer/add_gift_to_cart",
      method: 'post',
      data: data
  })
}
// 礼品店外调拨，获取购物车中礼品种类数
// store_id: 1
export function cartSize(data) {
  return request({
      url: "/House_transfer/get_gift_cart_size",
      method: 'post',
      data: data
  })
}
// 礼品店外调拨，获取购物车列表
// store_id: 1, 
// type: 1
export function getCartList(data) {
  return request({
      url: '/House_transfer/transport_cart_gift',
      method: 'post',
      data: data
  })
}
// 礼品店外调拨，删除购物车礼品
// gift_id: 78657
// store_id: 111
// type: 1
export function deleteCart(data) {
  return request({
      url: '/House_transfer/del_gift_from_cart',
      method: 'post',
      data: data
  })
}
// 礼品店外调拨，修改购物车礼品
// gift_id: 78657
// num: 修改后数量
// store_id: 111
// id: 1，购物车id
export function editCart(data) {
  return request({
      url: '/House_transfer/edit_gift_to_cart',
      method: 'post',
      data: data
  })
}
// 礼品店外调拨，清空购物车
// store_id: 111
// type: 1
export function clearCart(data) {
  return request({
      url: '/House_transfer/clean_cart_gift',
      method: 'post',
      data: data
  })
}
// 礼品店外调拨，提交订单
// store_id_in: 5
// store_id_out: 111
// order: [{"gift_id":"3","order_num":"1","look_money":6700000,"money_cost":6700000},{"gift_id":"76631","order_num":"13","look_money":57820000,"money_cost":57820000},{"gift_id":"78657","order_num":"1","look_money":23000000,"money_cost":23000000}]
// type: 2
export function submitOrder(data) {
  return request({
      url: '/House_transfer/create_transfer_order',
      method: 'post',
      data: data
  })
}


